package com.xhwl.centiotdata.handler.light.impl;

import com.xhwl.centiotdata.handler.light.LightIntegrationFactory;
import com.xhwl.centiotdata.handler.light.LightIntegrationHandler;
import com.xhwl.centiotdata.pojo.dto.huawei.IOTConfigDTO;
import com.xhwl.centiotdata.pojo.dto.pedestrian.PedestrianIntegrationConfigDTO;
import com.xhwl.centiotdata.suppliersystem.huawei.LightHuaWeiIoTDAHandler;
import com.xhwl.common.dto.cent.iotdata.light.LightActionDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author: yanyixiong
 * @Description:
 * @Date: create in 10:40 2022/1/12
 */
@Service
public class LightIntegrationHuaWeiIoTDAHandler extends LightIntegrationHandler {

    @Autowired
    LightHuaWeiIoTDAHandler lightHuaWeiIoTDAHandler;

    @Override
    public void afterPropertiesSet() throws Exception {
        LightIntegrationFactory.register(1,this);
    }

    @Override
    public boolean switchLight(IOTConfigDTO configDTO, LightActionDTO lightActionDTO) {
        return lightHuaWeiIoTDAHandler.switchLight(configDTO,lightActionDTO);
    }
}
